﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="details.aspx.vb" Inherits="felixfinalproject2.details" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    &nbsp;<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
    BackColor="#D8D8DA" BorderColor="#4E5557" BorderStyle="Groove" 
    BorderWidth="2px" CssClass="datagrid" DataKeyNames="ID" 
    DataSourceID="detailsdatasource" Font-Bold="False" Font-Italic="False" 
    Font-Names="Deneane" Font-Overline="False" Height="145px" Width="700px">
    <Fields>
        <asp:BoundField DataField="model" HeaderText="Model Number:" 
            SortExpression="model" />
        <asp:BoundField DataField="body_type" HeaderText="Body Type:" 
            SortExpression="body_type" />
        <asp:BoundField DataField="production_year" HeaderText="Manufacture Year: " 
            SortExpression="production_year" />
        <asp:BoundField DataField="features" HeaderText="Specifications:" 
            SortExpression="features" />
        <asp:BoundField DataField="price" HeaderText="Price:" SortExpression="price" />
        <asp:BoundField DataField="michelin_stars" HeaderText="Michelin Stars:" 
            SortExpression="michelin_stars" />
        <asp:HyperLinkField DataNavigateUrlFields="official_site_link" 
            HeaderText="Official Weblink:" Text="Click Me Please" />
    </Fields>
</asp:DetailsView>
<br />
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="ID" DataSourceID="detailsdatasource" Height="450px" 
        Width="700px" CssClass="datagrid">
    <Columns>
        <asp:ImageField DataImageUrlField="car_picture" HeaderText="Full Image">
            <ControlStyle CssClass="detailspicture" Height="450px" Width="700px" />
        </asp:ImageField>
    </Columns>
</asp:GridView>
<p align="center">
<asp:Button ID="btn_like" runat="server" Text="Like" 
        ToolTip="click button to like this car" />&nbsp;
<asp:Image ID="img_like" runat="server" Height="22px" ImageUrl="~/smiley.png" 
    Width="25px" ToolTip="you have liked this car." /></p>
<p>
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" CssClass="datagrid">
            <Columns>
                <asp:BoundField DataField="author" HeaderText="author" 
                    SortExpression="author" />
                <asp:BoundField DataField="title" HeaderText="title" SortExpression="title" />
                <asp:BoundField DataField="commentbody" HeaderText="commentbody" 
                    SortExpression="commentbody" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
            ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
            SelectCommand="SELECT [author], [title], [commentbody] FROM [comments] WHERE ([cars_fk_id] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="cars_fk_id" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
<p>
        <asp:SqlDataSource ID="detailsdatasource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
            ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
            SelectCommand="SELECT [model], [michelin_stars], [ID], [production_year], [body_type], [price], [features], [car_picture], [official_site_link] FROM [cars] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <center>
        <strong>Title:</strong>
        <asp:TextBox ID="txtbox_title" runat="server" Height="22px" Width="144px"></asp:TextBox>

    <p >
        <asp:TextBox ID="txtbox_commentbody" runat="server" Height="156px" 
            TextMode="MultiLine" Width="484px"></asp:TextBox><br/>
    
    
        <asp:Button ID="Button1" runat="server" Height="25px" Text="Comment" 
            Width="83px" /><br/>
    
        <asp:CheckBoxList ID="cb_tags" runat="server" 
            DataSourceID="SqlDataSource2" DataTextField="tagname" DataValueField="ID" 
            RepeatDirection="Horizontal" Height="30px" Width="119px">
        </asp:CheckBoxList>&nbsp; &nbsp;
        
        <asp:Button ID="Button2" runat="server" Text="Tag Car" />

                </p>
    <p >
        <strong>Add New Tag</strong><asp:TextBox ID="tb_newtag" runat="server"></asp:TextBox>&nbsp; &nbsp;
        <asp:Button ID="btn_newtag" runat="server" Text="Add Tag" />

        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
            ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
            SelectCommand="SELECT [ID], [tagname] FROM [tags]"></asp:SqlDataSource>
                </p>

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>   
    <br />
    <asp:Rating ID="Rating1" runat="server" EmptyStarCssClass="empty" 
        FilledStarCssClass="smiley-done" StarCssClass="smiley" 
        WaitingStarCssClass="empty" CurrentRating="3">
    </asp:Rating>&nbsp;
    
    <asp:Button ID="btn_rate" runat="server" Text="Rate" />
    <br />
<br />
    &nbsp; &nbsp;
&nbsp;&nbsp;&nbsp;
</center>
</asp:Content>
